/*
 * @Author: yaoling 1871883713@qq.com
 * @Date: 2022-12-25 20:29:46
 * @LastEditors: yaoling 1871883713@qq.com
 * @LastEditTime: 2022-12-25 20:40:33
 * @FilePath: \pc-file-company\src\utils\token-cache.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 本地存储
export const TOKEN_KEY = 'token'
export const setToken = (token: string) => {
  window.localStorage.setItem(TOKEN_KEY, token)
}
/**
 * @desc: 获取token
 */
export const getToken = () => {
  const token = window.localStorage.getItem(TOKEN_KEY)
  if (token != undefined && token != '') {
    return token
  }
  return ''
}
